package com.jsgt.greekfire.ui.mainassets.coindetail.adapter

import android.content.Context
import android.widget.RatingBar
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.jsgt.greekfire.R
import com.jsgt.greekfire.bean.MyTeamBean

class CoinAPPApplicationtAdapter(
    context: Context,
    layoutId: Int,
    data: ArrayList<MyTeamBean>? = null
) : BaseQuickAdapter<MyTeamBean, BaseViewHolder>(layoutId, data) {
    override fun convert(holder: BaseViewHolder, item: MyTeamBean) {
        holder.setImageResource(R.id.ivHead, item.image)
            .setText(R.id.tvName, item.name)
            .setText(R.id.tvSecurityLevel, item.securityLevel)
        var ratingBar: RatingBar = holder.getView(R.id.ratingBar)
        ratingBar.rating = item.rating.toFloat()
    }

}